<?php

// 上传游戏结果
require_once 'common/common.php';
require_once 'common/conn.php';

requestURL($_SERVER['REQUEST_URI']);

$usercode = getParameter("usercode");
$os = getParameter("os");

$result_array = array();
if ($usercode !== "") {
    $db = new DBC();
    $sql = "INSERT INTO t_a_start_record(usercode,os,createTime) VALUES('" . $usercode . "','" . $os . "',now())";
    if ($db->execute($sql)) {
        $result_array["errorNo"] = "0";
        $result_array["errorMsg"] = "";
    } else {
        $result_array["errorNo"] = "1";
        $result_array["errorMsg"] = "记录启动失败";
    }
} else {
    $result_array["errorNo"] = "2";
    $result_array["errorMsg"] = "参数不完整";
}
echo json_encode($result_array);
?>
